var express = require('express');
var router = express.Router();
var sqlUtils = require('../util/sqlUtil');

router.get("/",function(req,res,next){
    sqlUtils.sqlConnect("select * from system_data",function(err,data){
        if (err) {
            console.log(err);
        }else {
            data = JSON.parse(JSON.stringify(data));
            data = {
              "code": 0,
              "msg": "",
              "count": data.length,
              "data": data
            }
            res.send(data);
        }
    })
})


module.exports = router;